package oppo;

import java.util.Arrays;
import java.util.Collections;

/**
 * @author Hang
 * @date 2022/9/2
 * @project AutumnOffer
 * @description
 **/
public class Solution1 {
    public static void main(String[] args) {
        int[] digits = new int[]{3,4};
        System.out.println(maxDigit(digits));
    }
    public static int maxDigit (int[] digits) {
        // write code here
        int n = digits.length;
        int sum = 0;
        Arrays.sort(digits);
        for(int i=n-1;i>=0;i--){
            sum = sum*10+ digits[i];
        }
        return sum;
    }
}
